<html>
<head>
    <title>SM4 TEST</title>
    <script src="sm4.js"></script>
</head>
<body>
    <script>
   
   var input = "待加密";
   var key = "admin#$%^";
   
   //加密
	ec = SM4.encode({
		input:input,
		key:key
	});
	
	console.log('加密:'+ec);
	//解密
	var dc = SM4.decode({
		input:ec,
		key:key
	});
	console.log('解密:'+dc);
	
    </script>
</body>
</html>